//
//  SearchVcPresent.swift
//  SunxianhuaTestApp
//
//  Created by abc on 2021/10/12.
//

import Foundation
class SearchVcPresent: NewsTableViewPresent {
    
    var searchKey :String!
    init(searchKey :String) {
        self.searchKey = searchKey
    }

    override func handleData(listModel: ArticleListModel) {
        let list = listModel
        list.articles = list.articles.filter({$0.title.contains(self.searchKey)})
        list.handleData()
        self.dataArray = list.articles
    }
}
